<%@ Control Language="C#" ClassName="NoteWarning" Inherits="Dimok.Web.UI.TableControl" %>
<script runat="server">
	protected void UpdateNoteStatus(object sender, EventArgs e) {
		Data.SQL.Note.UpdateStatus(sender);
	}
</script>
<asp:UpdatePanel ID="pnlRebateOffers" UpdateMode="Always" runat="server">
	<ContentTemplate>
<DS:NoteWarningsSource ID="ds" OrderBys="StatusDate DESC" EmtyRowPolicy="None" runat="server">
	<SelectParameters><asp:ControlParameter PropertyName="NamingContainer.ApplID" Name="LoanID" DefaultValue="0" Type="Object" /></SelectParameters>
	<FilterParameters>
		<asp:Parameter DefaultValue="true" Type="Boolean" Name="Warnings" />
	</FilterParameters>
</DS:NoteWarningsSource>
<UI:GridViewMB ID="grvWarning" runat="server" AutoGenerateColumns="False" DataSourceID="ds" style="width:auto"
		AllowSorting="false"	DataKeyNames="ID" EnableViewState="false" ShowFooter="false" AllowPaging="false"
		ShowSearch="false" AllowEdit="false" ShowDelete="false" ShowHeader="false" OnRowClick="void"
		RowStyle-Font-Bold="true" RowStyle-ForeColor="DarkRed"
>
	<Columns>
	<%--<asp:TemplateField><ItemTemplate><img src="/images/Star.gif" /></ItemTemplate></asp:TemplateField>--%>
	<asp:ImageField DataImageUrlField="NoteTypeIconURL" DataImageUrlFormatString="/images/{0}"  />
<asp:TemplateField HeaderText="Note" SortExpression="Note">
	<ItemStyle CssClass="noOver" />
	<ItemTemplate>
		<fieldset style="display:inline"><legend style="color:DarkRed;font-weight:bold;behavior: url(/Include/HTC/Toggle.htc)" state="+">
			<label>
		<asp:Label Text='<%#Lib.Substring(Eval("Note"),30)%>' ToolTip='<%#Eval("Note")%>' runat="server" />
			</label>
		</legend>
		<table Width="250pt"><tr><td style="font-size:125%;color:Blue;white-space:normal;color:Navy;font-family:Monospace">
			<%#Eval("Note")%>
		</td></tr></table>
		</fieldset>
	</ItemTemplate>
	<EditItemTemplate><asp:TextBox TextMode="MultiLine" style="width:250pt;font-family:Monospace;white-space:normal" Text='<%# Bind("Note") %>' ID="txtNote" runat="server" /></EditItemTemplate>
	<FooterTemplate><asp:TextBox ID="Note" runat="server" /></FooterTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
	<%#Eval("NoteDate","{0:MM/dd/yy -> }")+ Eval("DateDue","{0:MM/dd/yy}")%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="NoteUser" />
<asp:TemplateField HeaderText="Result" SortExpression="StatusNick">
	<ItemTemplate>
			<DS:StateFlowNextStatesDataSource ID="dsSN_Edit" StateFromID='<%#int.Parse("0"+Eval("StatusID"))%>' runat="server" />
		<asp:DropDownList SelectedValue='<%#Bind("StatusID")%>' onclick="event.cancelBubble=true;" onchange="if(!confirm('Change status?'))return;" NoteID='<%#Eval("ID")%>' ID="selStatusID" DataSourceID="dsSN_Edit" DataTextField="StateTo" DataValueField="StateToID" AutoPostBack="true" OnSelectedIndexChanged="UpdateNoteStatus" runat="server"/>
	</ItemTemplate>
</asp:TemplateField>
</Columns>
</UI:GridViewMB>

	</ContentTemplate>
</asp:UpdatePanel>
